#pragma once

class CChCSettings: public CObject
{
public:	
	static CChCSettings* Instance();
	static BOOL Initialize();
	static void Uninitialize();
	~CChCSettings(void);

	BOOL ReadSetings();
	BOOL SaveSettings();

	CString		HostName			(				) const { return m_strHostName; }
	UINT		Port				(				) const { return m_uPort; }
	COLORREF	ColorToMessages		(				) const { return m_ColorToMessages; }
	COLORREF	ColorFromMessages	(				) const { return m_ColorFromMessages; }
	COLORREF	ColorSystemMessages	(				) const { return m_ColorSystemMessages; }
	COLORREF	ColorToAllMessages	(				) const { return m_ColorToAllMessages; }
		
	void		HostName			(CString val	) { m_strHostName = val; }
	void		Port				(UINT val		) { m_uPort = val; }
	void		ColorToMessages		(COLORREF val	) { m_ColorToMessages = val; }
	void		ColorFromMessages	(COLORREF val	) { m_ColorFromMessages = val; }
	void		ColorSystemMessages	(COLORREF val	) { m_ColorSystemMessages = val; }
	void		ColorToAllMessages	(COLORREF val	) { m_ColorToAllMessages = val; }

protected:
	virtual void Serialize(CArchive &ar);

private:
	static CChCSettings* s_pInstance;
	CChCSettings(void);

	//properties
	CString		m_strHostName;
	UINT		m_uPort;
	COLORREF	m_ColorSystemMessages;
	COLORREF	m_ColorFromMessages;
	COLORREF	m_ColorToMessages;
	COLORREF	m_ColorToAllMessages;
};
